if ($("viewthread")!=null){
document.writeln("<div id=\"shangxia\"><div id=\"shang\"><\/div><div id=\"comt\"><\/div><div id=\"xia\"><\/div><\/div>")}
if ($("index")!=null || $("forumdisplay")!=null ){document.writeln("<div id=\"shangxia\"><div id=\"shang\"><\/div><div id=\"xia\"><\/div><\/div>")}
document.writeln("<style>");
document.writeln("#shangxia{position:fixed;top:40%;left:50%;margin-left:-520px;display:block;}");
document.writeln("\/* 使用fixed使id=“shangxia”的对象固定于浏览器中，相对的上距离为40%，左距离为50%（即居中），然后向左移动520px（需自行调整！！！） *\/");
document.writeln("#shang{background:url(http:\/\/default.5d6d.com\/userdirs\/c\/2\/default\/attachments\/day_110715\/11071515394c85dbd709ffb6f6.png) no-repeat;position:relative;cursor:pointer;height:15px;width:29px;margin:10px 0;}");
document.writeln("#xia{background:url(http:\/\/default.5d6d.com\/userdirs\/c\/2\/default\/attachments\/day_110715\/1107151539ac9bf202a23f4a70.png) no-repeat;position:relative;cursor:pointer;height:15px;width:29px;margin:10px 0;}");
document.writeln("<\/style>")


$jq('#shang').click(function(){$jq('html,body').animate({scrollTop: '0px'}, 800);}); 
//点击id="shang"对象时，滑动至相对浏览器滚动条为0px（即顶部），时间为800毫秒

$jq('#xia').click(function(){$jq('html,body').animate({scrollTop:$jq('#footer').offset().top}, 800);});
document.writeln("<style>");
document.writeln("#shang:hover{background:url(http:\/\/default.5d6d.com\/userdirs\/c\/2\/default\/attachments\/day_110715\/1107151539d02c5a8e940bc643.png) no-repeat;}");
document.writeln("#xia:hover{background:url(http:\/\/default.5d6d.com\/userdirs\/c\/2\/default\/attachments\/day_110715\/11071515393c7ccdde3272d5a5.png) no-repeat;}");
document.writeln("<\/style>")
